package com.xhwl.logistics.converter.mapstruct.logistics;

import com.xhwl.logistics.entity.logistics.VehicleAccess;
import com.xhwl.logistics.vo.logistics.VehicleAccessVO;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface VehicleAccessConverter {

    VehicleAccessConverter INSTANCE = Mappers.getMapper(VehicleAccessConverter.class);

    VehicleAccess toPoConvert(VehicleAccessVO source);


    VehicleAccessVO toVoConvert(VehicleAccess source);

    @IterableMapping(elementTargetType = VehicleAccess.class)
    List<VehicleAccess> toPoConvertList(List<VehicleAccessVO> source);

    @IterableMapping(elementTargetType = VehicleAccessVO.class)
    List<VehicleAccessVO> toVoConvertList(List<VehicleAccess> source);
}
